﻿package core.ui.controls
{
    import flash.display.*;
    import flash.events.*;

    public class IconLink extends Sprite
    {
        var icon:Bitmap;
        var text:Literal;

        public function IconLink(param1:BitmapData, param2:String = "", param3:uint = 0)
        {
            this.icon = new Bitmap(param1);
            addChild(this.icon);
            this.text = new Literal(param2, false, param3);
            this.text.x = 17;
            this.text.y = -1;
            addChild(this.text);
            this.buttonMode = true;
            this.mouseChildren = false;
            this.alpha = 0.8;
            this.addEventListener(MouseEvent.ROLL_OVER, this.MouseOver, false, 1, true);
            this.addEventListener(MouseEvent.ROLL_OUT, this.MouseOut, false, 1, true);
            return;
        }// end function

        private function MouseOver(event:MouseEvent) : void
        {
            this.alpha = 1;
            return;
        }// end function

        private function MouseOut(event:MouseEvent) : void
        {
            this.alpha = 0.8;
            return;
        }// end function

    }
}
